<template>
	<div class="bigBox" id="app">
		<div class="tabSwitch">
			<nav v-for="(item,index) in defaultArr" :class="currentIndex == index ? 'switchOn': ''"  @click="back(index)">{{item}}</nav>
			<nav class="determine">判定</nav>
		</div>
		<div class="bj">	    
			<!-- 计算转化分 -->
			<p class="calculate" @click="mark && mark == 2 ? tips() : calculate()" v-if="!userStatus">
				计算转化分
			</p>
	
			<!-- 体质辨识得分 -->
			<p class="identification">
				<img src="../../../static/img/questionnaire/title@2x.png" alt="">
			</p>
	
			<table class="table">
				<tr>
					<td>体质类型</td>
					<td>转化分数</td>
					<td>分数对应</td>
				</tr>
				<tr v-if="!calculatePoints.appPhysiqueScoreEntitiesvo || calculatePoints.appPhysiqueScoreEntitiesvo.length <= 0" v-for="(item,index) in defaultArr" :key="index">
					<td>{{item}}</td>
					<td></td>
					<td></td>
				</tr>
				<tr v-if="calculatePoints.appPhysiqueScoreEntitiesvo && calculatePoints.appPhysiqueScoreEntitiesvo.length > 0"  v-for="(item,index) in calculatePoints.appPhysiqueScoreEntitiesvo" :key="index">
					<td>{{item.typeName}}</td>
					<td>{{item.score}}</td>
					<td>{{item.result}}</td>
				</tr>
			</table>
	
			<p class="userName">
				<span>转化人：<i>{{calculatePoints.userName}}</i></span>
				<span>转化日期：<i>{{calculatePoints.createdDate}}</i></span>
			</p>
	
			<div class="correction" v-if="calculateStatus">
				<p class="identification">
					<img src="../../../static/img/questionnaire/title@2x.png" alt=""><span>(修正)</span>
				</p>
					
				<table class="table">
					<tr>
						<td>体质类型</td>
						<td>转化分数</td>
						<td>分数对应</td>
					</tr>
					<tr v-if="!calculatePoints.appPhysiqueScoreEntitiesvo || calculatePoints.appPhysiqueScoreEntitiesvo.length <= 0" v-for="(item,index) in defaultArr" :key="index">
						<td>{{item}}</td>
						<td></td>
						<td></td>
					</tr>
					<tr v-if="calculatePoints.appPhysiqueScoreEntitiesvo && calculatePoints.appPhysiqueScoreEntitiesvo.length > 0"  v-for="(item,index) in calculatePoints.appPhysiqueScoreEntitiesvo" :key="index">
						<td>{{item.typeName}}</td>
						<td :style="{color:item.dissimilarity?'#f00':''}">{{item.healthScore}}</td>
						<td :style="{color:item.dissimilarity?'#f00':''}">{{item.healthResult}}</td>
					</tr>
				</table>
				<p class="userName" style="margin-bottom: 0;">
					<span>体检人：<i>{{calculatePoints.healthName}}</i></span>
					<span>体检日期：<i>{{calculatePoints.createdDate}}</i></span>
				</p>
			</div>
			<!-- 返回上一页跟列表 -->
			<div class="operation" v-if="!userStatus">
				<view class="page" @click="page">返回评估</view>
			</div>
			
			<div class="operation" v-if="calculateStatus">
				<view class="page" @click="details">中医体检-望，闻，切详情</view>
			</div>
		</div>
	</div>
</template>

<script src="@/static/js/quickly/tcm/physical2.js">
</script>

<style lang="scss" scoped>
	@import '@/static/css/quickly/tcm/physical.scss';
</style>
